package com.alibaba.goods.storage.service;

import com.alibaba.goods.storage.dao.StorageDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @Author:RenPu
 * @Date: 2020/7/7 15:20
 * @Version: 1.0
 * @description:
 */

@Service
@Slf4j
public class StorageServiceImpl implements StorageService {


    @Resource
    private StorageDao storageDao;

    @Override
    public void decrease(Long productId, Integer count) {

        log.info( "----------storage-service扣减库存开始------------" );

        //int u=10/0;

        storageDao.decrease( productId,count );

        log.info( "----------storage-service扣减库存结束------------" );

    }
}
